package com.imooc.ecommerce.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户表实体类
 * @author zhangshao
 * @date 2023/11/15 22:08
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_ecommerce_user")
public class EcommerceUser implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 用户名称
     */
    @TableField("username")
    private String username;

    /**
     * 密码
     */
    private String password;


    /**
     * 额外信息
     */
    @TableField("extra_info")
    private String extraInfo;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill= FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date updateTime;
}
